<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>{$pagetitle}</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <link rel="stylesheet" href="/static/admin/layui/css/layui.css" media="all">
        <link rel="stylesheet" href="/static/admin/style/global.css" media="all">
        <style>
            .layui-form-label{ width:8%;}
            .layui-form-item .layui-input-inline{ width:80%}
        </style>
    </head>
    <body>
        <div class="layui-fluid" style="padding: 15px;">
            <form action="{:url()}" class="layui-form" method="post" lay-filter="component-form-element" onsubmit="return save_form(this)">
                <input type="hidden" name="id" value="{$r.id}">
                <input type="hidden" name="cache_id" value="{$cache_id}">
                <input type="hidden" name="pubid" value="{$r.pubid}">
                <input type="hidden" name="catid" value="{$cat.catid}">
                <!--is_top is_good 是置顶和推荐，因为checkbox不选的话表单就没有这个字段，所以这里默认是0-->
                <input type="hidden" name="is_top" value="0">
                <input type="hidden" name="is_good" value="0">
                <!---->
                <input type="hidden" name="action_type" id="action_type" value="submit">
                <div class="layui-row layui-col-space15">

                    <div class="layui-col-md6" style="width:80%;">

                        <div class="layui-card">
                            <div class="layui-card-body">
                                <div class="layui-tab layui-tab-card">
                                    <ul class="layui-tab-title" style="position: relative"><li class="layui-this">{$pagetitle}</li>
                                    </ul>
                                    <div class="layui-tab-content">
                                        <div class="layui-tab-item layui-show"><?=think\facade\View::fetch($ModelTemp)?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-col-md6" style="width: 20%;">

                        <div class="layui-card" style="padding: 15px 0px;">
                            <div class="layui-card-header">SEO标题</div>
                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <input type="text" name='pagetitle' value="{$r.pagetitle}" placeholder="不填写默认调用标题" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-card-header">关键词</div>
                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <input type="text" name='keywords' value="{$r.keywords}" placeholder="多个用半角的逗号隔开" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-card-header">描述</div>
                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <textarea name="description" placeholder="请输入" class="layui-textarea">{$r.description}</textarea>
                                </div>
                            </div>

                            <div class="layui-card-header">点击数</div>
                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <input type="text" name='views' value="{$r.views}" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-card-header">自定义链接</div>
                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <input type="text" name='titleurl' value="{$r.titleurl}" placeholder="留空则系统默认" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-card-header">站外链接</div>
                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <input type="text" name='link' value="{$r.link}" placeholder="填写将直接跳转到此链接" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-card-header">内容模板</div>
                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <select name="viewtemp">
                                        <option value="">使用默认内容模板</option>
                                        {foreach $viewtemp as $v}
                                        <option {$v['template_id']==$r['viewtemp']?'selected':''} value="{$v.template_id}">{$v.name}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>

                            <div class="layui-card-body layui-row layui-col-space10">
                                <div class="layui-col-md12">
                                    <input type="checkbox" name="is_top" value="1" {if $r.is_top}checked{/if} title="置顶">
                                    <input type="checkbox" name="is_good" value="1" {if $r.is_good}checked{/if}  title="推荐">
                                </div>
                            </div>

                        </div>

                    </div>
                </div>

                <input type="hidden" name="ssssss_publish_time" value="0" id="publish_time">

                <div class="layui-form-item layui-layout-admin" style="margin-top: 30px;">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <button class="layui-btn" type="submit" onclick="tinymce.triggerSave();$('#action_type').val('readyCheck')">
                                <i class="layui-icon layui-icon-release"></i> 提交审核
                            </button>
                            <button class="layui-btn layui-btn-primary" onclick="$('#action_type').val('draft')" id="save_draft">
                                <i class="layui-icon layui-icon-edit"></i> 存草稿
                            </button>
                            <button type="button" class="layui-btn layui-btn-primary back">
                                <i class="layui-icon layui-icon-close"></i> 返回
                            </button>
                        </div>
                    </div>
                </div>

            </form>

        </div>
        {include file="info/js"}



    </body>
</html>
